package main

import "log"

func main() {
	//数组
	var arr [3]int
	arr1 := [4]int{1, 2, 3, 4}
	arr2 := [...]int{21, 3, 4, 5, 6}
	log.Println(arr)
	log.Println(arr1, arr2)

	for i, i2 := range arr2 {
		log.Println(i, i2)
	}

	//切片
	var s0 []int
	log.Println(len(s0), cap(s0))

	s1 := []int{1, 2, 3, 4, 5}
	log.Println(len(s1), cap(s1))

	// 长度是3 容量是5
	s2 := make([]int, 3, 5)

	println(len(s2), cap(s2))
}
